class ContentPiece extends egret.DisplayObjectContainer
{
    private m_id:string;
    public m_bitMap:egret.Bitmap;
    private m_activity:boolean;
    private m_speed:number;
    public m_addTag:number = 0;
    public m_isAdd:boolean = false;
    public constructor(id:string,pic:string,speed:number, addTag:number)
    {
        super();
        this.m_addTag = addTag;
        this.m_id = id;
        this.m_speed = speed;
        this.m_activity = true;
        this.m_bitMap = new egret.Bitmap();
        this.m_bitMap.texture = RES.getRes(pic);
        this.width = this.m_bitMap.width;
        this.height = this.m_bitMap.height;
        this.m_bitMap.anchorOffsetX = this.m_bitMap.width / 2;
        this.m_bitMap.anchorOffsetY = this.m_bitMap.height / 2;
        this.m_bitMap.x = this.m_bitMap.width / 2;
        this.m_bitMap.y = this.m_bitMap.height / 2;
        this.anchorOffsetX = this.width / 2;
        this.anchorOffsetY = this.height;// / 2;
		this.addChild(this.m_bitMap);
    }
    public getBitMap():egret.Bitmap
    {
        return this.m_bitMap;
    }
    public resetInfo(pic:string, speed:number)
    {
        this.m_speed = speed;
        this.m_activity = true;
        this.visible = true;
        this.x = 0;
        this.m_bitMap.texture = RES.getRes(pic);
    }
    public getId():string
    {
        return this.m_id;
    }
    public getSpeed():number
    {
        return this.m_speed;
    }
    public setDisable()
    {
        this.visible = false;
        this.m_activity = false;
    }
    public getActivity():boolean
    {
        return this.m_activity;
    }
}